home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / queue.lzh / queue / queue_library.h < prev    next >
C/C++ Source or Header  |  1995-10-12  |  2KB  |  73 lines

  1. /*
  2.    queue_library.h --- queue library internals.
  3.  
  4.    (c) Copyright 1995 SHW Wabnitz
  5.    Written by Bernhard Fastenrath (fasten@shw.com)
  6.  
  7.    This file may be distributed under the terms
  8.    of the GNU General Public License.
  9. */
  10.  
  11. #include <exec/types.h>
  12. #include <exec/lists.h>
  13. #include <exec/nodes.h>
  14. #include <exec/memory.h>
  15. #include <dos/dos.h>
  16. #include <dos/dosextens.h>
  17. #include <dos/filehandler.h>
  18.  
  19. #include <proto/exec.h>
  20. #include <proto/dos.h>
  21.  
  22. #include <stdlib.h>
  23. #include <string.h>
  24.  
  25. #include "queue.h"
  26.  
  27. typedef struct List List;
  28. typedef struct Node Node;
  29. typedef struct MinNode MinNode;
  30. typedef struct MsgPort MsgPort;
  31. typedef struct Message Message;
  32. typedef struct StandardPacket StandardPacket;
  33. typedef struct DevProc DevProc;
  34. typedef struct DosInfo DosInfo;
  35. typedef struct DeviceNode DeviceNode;
  36. typedef struct RootNode RootNode;
  37. typedef struct Task Task;
  38.  
  39. typedef struct {
  40.   Node  qn_Node;
  41.   List  qn_List;
  42.   ULONG qn_Refs;
  43.   ULONG qn_Read;
  44.   List  qn_Handles;
  45. } QueueNode;
  46.  
  47. /* bitmasks for qm_Status */
  48. #define QMS_ACTIVE   0x01
  49. #define QMS_INACTIVE 0x02
  50. #define QMS_REMOVED ( QMS_INACTIVE | 0x04 )
  51. #define QMS_MARKER  ( QMS_INACTIVE | 0x08 )
  52.  
  53. typedef struct {
  54.   MinNode       qh_MinNode;
  55.   USHORT        qh_Mode;
  56.   USHORT        qh_Pad;
  57.   QueueNode    *qh_QNode;
  58.   ULONG        qh_SigMask;
  59.   Task         *qh_SigTask;
  60.   union {
  61.     struct {
  62.       QMessage *qhl_Message;
  63.       MinNode   qhl_MinNode; /* same as qm_MinNode */
  64.       USHORT    qhl_Status;  /* same as qm_Status  */
  65.       USHORT    qhl_Pad;
  66.     } qhl;
  67.     struct {
  68.       List      qhs_ReplyList;
  69.       ULONG    qhs_MsgCount;
  70.     } qhs;
  71.   } qh_un;
  72. } QueueHandle;
  73.